package vnc;

import java.awt.Dimension;
import java.util.List;

import javax.swing.JPanel;

import jpcap.packet.Packet;

import vnc.ui.MovingBox;

public class PacketAnalyzePanel extends JPanel{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	MovingBox mb;
	
	public String iph,mach;
	
	public PacketAnalyzePanel(List<Packet> packets, int width, int height){
				
		mb = new MovingBox(packets, width, height);
		
		mb.setSize(new Dimension(width, height));
		
		this.setLayout(null);
		
		mb.setBounds(0, 0, width, height);
		
		this.add(mb);
		
		
	}
	
	public void clear(){
		mb.clear();
		// address table need to be clear as well...
	}
	
	public void removeBox(int index){
		mb.removeBox(index);
	}
}
